package com.xinshujia.wxxcx.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.xinshujia.wxxcx.service.MachineService;
import com.xinshujia.wxxcx.util.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Author Cui Han
 * @Date 2024/3/14 11:20
 * @Description: TODO
 * @Version 1.0
 */
@RestController
@RequestMapping("/machine")
public class MachineController {

    @Autowired
    private MachineService machineService;



    /**
     * 根据产线id查询所有机床
     * @param productionLineId
     * @return
     */
    @GetMapping("/findByProductionLineIdMachine")
    @SaCheckLogin
    public Result findByProductionLineIdMachine(Long productionLineId){
        return Result.ok(machineService.findByProductionLineIdMachine(productionLineId));
    }
}
